function setRem() {
    //获取HTML
    var html = document.querySelector("html");
    //html的相对于视口的宽度
    var htmlWidth = html.clientWidth;
    //设置
    html.style.fontSize = (htmlWidth / 414) * 100 + "px";
}
setRem();
window.onresize = setRem;